查询订单
可通过“商户订单号”和“微信订单号”两种方式查单。
🚫
本接口服务已于 2019.12.16
(北京时间)下线,文档仅做留存参考。
请求参数 | 类型 | 描述 |
---|---|---|
transaction_id | string | 微信支付订单号 |
query | object | 声明请求的查询参数 |
sub_mchid | string | 特约商户号 |
php
$instance->v3->ebike->charge->transactions->id->_transaction_id_->getAsync([
'transaction_id' => '25012014070332333018',
'query' => [
'sub_mchid' => '1900000109',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/ebike/charge/transactions/id/{transaction_id}')->getAsync([
'transaction_id' => '25012014070332333018',
'query' => [
'sub_mchid' => '1900000109',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/ebike/charge/transactions/id/{transaction_id}']->getAsync([
'transaction_id' => '25012014070332333018',
'query' => [
'sub_mchid' => '1900000109',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->ebike->charge->transactions->id->_transaction_id_->get([
'transaction_id' => '25012014070332333018',
'query' => [
'sub_mchid' => '1900000109',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/ebike/charge/transactions/id/{transaction_id}')->get([
'transaction_id' => '25012014070332333018',
'query' => [
'sub_mchid' => '1900000109',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/ebike/charge/transactions/id/{transaction_id}']->get([
'transaction_id' => '25012014070332333018',
'query' => [
'sub_mchid' => '1900000109',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
mchid | string | 商户号 |
sub_mchid | string | 特约商户号 |
appid | string | 服务商公众号ID |
sub_appid | string | 特约商户公众号ID |
out_trade_no | string | 商户订单号 |
transaction_id | string | 微信订单号 |
attach | string | 商户数据 |
trade_type | string | 交易类型 |
bank_type | string | 银行类型 |
success_time | string | 成功时间 |
trade_state | string | 交易状态 |
trade_state_des | string | 交易状态描述 |
contract_id | string | 充电授权扣费协议号 |
payer | object | 支付者信息 |
openid | string | 用户在服务商的标识 |
sub_openid | string | 用户在特约商户的标识 |
amount | object | 订单金额信息 |
total | integer | 订单金额 |
currency | string | 货币类型 |
payer_total | integer | 用户实际支付金额 |
discount_total | integer | 折扣 |
device_info | object | 设备信息 |
device_id | string | 充电位设备号 |
device_ip | string | 商户端设备ip |
promotion_detail | object[] | 优惠信息 |
promotion_id | string | 券ID |
name | string | 优惠名称 |
scope | string | 优惠范围 |
type | string | 优惠类型 |
activity_id | string | 活动ID |
amount | integer | 优惠券面额 |
wxpay_contribute | integer | 微信出资 |
merchant_contribute | integer | 商户出资 |
other_contribute | integer | 其他出资 |
参阅 官方文档